<%@ page language="java"  pageEncoding="UTF-8" import="com.yb.util.comm.RequestUtil,com.yb.domain.member.TsSysuser,com.yb.util.comm.Contants;"  contentType="text/html; charset=utf-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title><s:property value="triObj.title"/>-幸福兄弟-幸福兄弟拼购网-拼购俱乐部-拼客论坛</title>
	<meta name="description" content="幸福兄弟盐城拼购第一网www.9898sj.com是幸福兄弟营销策划有限公司旗下品牌项目。幸福兄弟盐城拼购第一网是专门针对建材、家具、电器进行同城拼购的一个网站。将全城千万消费者聚拢在一起，用量来获得最低的购买价格。网站聚集了全城1000个知名优质品牌，消费者足不出户就能完成对盐城建材、家具、电器市场进行最深刻的了解，通过拼购网购买是免费的，消费者不需要花一分钱就能实现最省钱、省心、舒心的购买。幸福兄弟盐城拼购第一网将帮助1000个优质品牌企业最大程度的宣传全城，帮助品牌企业好的口碑得到良好的传播，从而实现最好的销售。希望幸福兄弟盐城拼购第一网能为您的幸福生活、您的成功带来帮助！幸福生活，从拼购开始。公司地址，盐城市南城河路9号（迎宾桥北桥头东侧）；联系电话：0515-88175689  88175528"/>
	<meta name="keywords" content="幸福兄弟，幸福兄弟盐城拼购第一网，幸福兄弟拼购，幸福兄弟拼购网，盐城拼购，盐城拼购，盐城建材拼购，盐城家具拼购，盐城电器拼购，建材拼购，家具拼购，电器拼购"/>
<link href="../resource/css/css3.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="../resource/css/pagination2.css"></link>
 <link rel="stylesheet" href="../resource/css/whole.css" type="text/css"></link>
<link rel="stylesheet" type="text/css" href="../resource/css/information/examples.css"></link>
<link rel="Shortcut Icon" type="image/x-icon" href="<%=basePath%>resource/img/favicon.ico" media="screen" />
<script type="text/javascript" src="../resource/js/jquery-1.4.2.js"></script>
<script type="text/javascript" src="../resource/js/pagination2.js"></script>
<script type="text/javascript" src="../resource/js/jquery-impromptu.3.1.min.js"></script>
	  <link rel="stylesheet" href="../resource/js/kindeditor-4.1/themes/default/default.css" />
	<link rel="stylesheet" href="../resource/js/kindeditor-4.1/plugins/code/prettify.css" />
	<script charset="utf-8" src="../resource/js/kindeditor-4.1/kindeditor.js"></script>
	<script charset="utf-8" src="../resource/js/kindeditor-4.1/lang/zh_CN.js"></script>
	<script charset="utf-8" src="../resource/js/kindeditor-4.1/plugins/code/prettify.js"></script>
	<style type="">
	.luntan4{
	  float:left;
	}
	</style>
</head>
<script>
function checkmodify() {
	if('${sessionScope.userinfo.id}'==''){
		alert("请先登陆");
//		window.top.location='../index.html';
		return false;
	}
	var triObjTitle = document.getElementById("triObjTitle");
	if ((!checkNull(triObjTitle))) {
		alert("请先填写标题");
		triObjTitle.focus();
		return false;
	}
	if (editor.html()=='') {
		editor.focus();
		alert("请填写内容");
		return false;
	}
	
	if (confirm("确认发帖吗?"))
		return true;
	return false;
}
var visMnu = "";
var actMnu;
function menuHandler(actMnu,id)
{
   hideMenu(actMnu);
}
function flipMenu(actMnu)
{
 	var path = document.getElementById("img1").src;
 	 if(path.substring(path.lastIndexOf('/')+1)=='open.png'){
 	 	document.getElementById("img1").src="../resource/img/close.png";
 	 }
 	 if(path.substring(path.lastIndexOf('/')+1)=='close.png'){
 	 	document.getElementById("img1").src="../resource/img/open.png";
 	 }
   if (visMnu == "")
      showMenu(actMnu);
   else
   {
      if (visMnu == actMnu)
         hideMenu(actMnu);
      else
      {
         hideMenu(visMnu);
         showMenu(actMnu);
      }
   }
}
function showMenu(actMnu)
{
   actMnu.style.background = "#9CB8D8";
   actMnu.style.visibility = "visible";
   visMnu = actMnu;
}
function hideMenu(actMnu)
{
   actMnu.style.background = "";
   actMnu.style.visibility = "hidden";
   visMnu = "";
}
       var basePath="<%=basePath%>";
</script>
<body id="top">
<jsp:include page="../eva_img.jsp"></jsp:include>
<div id="grayDiv" style="z-index:20;display: none;background: #ECECEC;width: 100%;height: 100%;position: absolute;filter:alpha(opacity=50);-moz-opacity:0.5;-khtml-opacity: 0.5;opacity: 0.5;">
</div>
<div id="joinDiv" style="z-index:21; display: none;position: absolute;width: 650px;height: 450px;background:url('<%=basePath %>resource/img/brand/win_ft.png');">
	<div style="width: 100%;height: 50px;border-bottom: 2px solid #33A7D1;">
		<table width="100%" height="100%" border="0">
		<tr><td width="150px" style="color: #000000;font-weight: bold;font-size: 16px;padding-left: 5px;">&nbsp;</td><td style="padding-left: 20px;font-size: 15px" valign="middle">&nbsp;</td><td width="50px" align="right" valign="middle" style="font-weight: bold;padding-right:15px;cursor: pointer;" onclick="hideJoin();" title="关闭">&nbsp;&nbsp;</td></tr>
		</table>
	</div>
  <form name="form" method="post" action="../tribune/tribune_addtribune.shtml" onsubmit="return checkmodify()" enctype="multipart/form-data">
	  <div class="tritable">
	  <table width="600" style="margin-top: 10px;" border="0" cellspacing="0" cellpadding="0">
	  <tr>
	    <td style="padding-left:15px; padding-top:5px; padding-bottom:15px;"> 标题  <input style="height: 20px;" id="triObjTitle" type="text" size="80" maxlength="50" name="triObj.title"  /></td>
	  </tr>
	  <tr>
	    <td style="padding-left:15px; padding-top:5px;">
	    <textarea style="width:600px;;height:250px;word-wrap:break-word;" name="triObj.content" id="trcontent"></textarea></td>
	  </tr>
	  <tr>
			<td>&nbsp;
			</td>
		</tr>
	  <tr>
			<td style="padding-left:15px;margin-top: 10px;" align="left">
				<input type="submit" value="提交"/>&nbsp;&nbsp;
				<input type="button" value="取消" onclick="hideJoin();"/>
			</td>
		</tr>
	</table>
	<input type="hidden" name="triObj.id" value="0"/>
	<input type="hidden" name="triObj.flowCount" value="0"/>
	<input type="hidden" name="triObj.viewCount" value="0"/>
	<input type="hidden" name="triObj.isMarrow" value="2"/>
	<input type="hidden" name="triObj.flowers" value="0"/>
	<input type="hidden" name="triObj.eggs" value="0"/>
	<input type="hidden" name="triObj.isTop" value="0"/>
	<input type="hidden" id="sessionFlag" value="${sessionScope.userinfo.id}"/>
	</div>
  </form>
</div>
<form name="form" method="post" action="../tribuneFlow/tribuneFlow_addFlowtribune.shtml" onsubmit="return checkmodify()" enctype="multipart/form-data">
<jsp:include page="../index/top.jsp"></jsp:include>
<div id="nav">
<table width="1000" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td style="background:url(../resource/img/index/sh-1.jpg) no-repeat; height:39px; width:11px">&nbsp;</td>
    <td width="982" style="background:url(../resource/img/index/sh-2.jpg) repeat-x; line-height:33px">

      <div id="nav-1"><a href="<%=basePath %>home.shtml">首页</a> &gt; <a href="<%=basePath %>tribune/tribune_julebuPage.shtml">拼客俱乐部</a> &gt; 拼客论坛</div>
      <div id="nav-2"><a href="#" onclick="sendTie();" >我要发帖</a></div></td>
    <td style="background:url(../resource/img/index/sh-3.jpg) no-repeat; height:39px; width:7px">&nbsp;</td>
  </tr>
</table>
</div>
<div class="content">
  <div class="luntan1">
    <s:property value="triObj.title"/>
  </div>
  <div class="luntan">
  <div class="luntan2">
  <table width="1000" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="300" align="left" style="color:#036">&nbsp;&nbsp;点击：<s:property value="triObj.viewCount"/> &nbsp;&nbsp;&nbsp; 回复：<s:property value="triObj.flowCount"/></td>
    <td align="right"><div class="sabrosus">
      </div></td>
  </tr>
</table>
</div>
  <div class="luntan2">
  <table width="1000" border="0" cellspacing="0" cellpadding="0">
  
  <tr>
    <td> 
      <table width="1000" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="200" height="30" align="left"><!--<a href="#" style="color:#036">&nbsp;&nbsp;只看楼主</a>&nbsp; <a href="#" style="color:#036"> 关注此帖</a>  --></td>
          <td width="600" id='td<s:property value="triObj.id"/>' align="center" style="color:#396">楼主： <s:property value="triObj.authorName"/>   发表日期：<s:date name="triObj.createTime" format="yyyy-MM-dd HH:mm:ss"/></td>
          <td width="200" align="right"><c:if test="${userinfo.type==3}"><a href="javascript:sendEggOrFlower(<s:property value="triObj.id"/>,'1')" style="color:#036"><img src="../resource/img/flower.gif"/>鲜花（<s:property value="triObj.flowers"/>）</a>&nbsp; <a href="javascript:sendEggOrFlower(<s:property value="triObj.id"/>,'2')" style="color:#036"><img src="../resource/img/egg.gif"/>送蛋（<s:property value="triObj.eggs"/>）</a>&nbsp;<a href="#001" onclick="onReplay('<s:property value="triObj.id"/>','1')"  style="color:#999">回复</a>&nbsp;&nbsp;</c:if></td>
          <td width="30" align="right" valign="bottom">
          	<c:if test="${sessionScope.userinfo.tribuneMaster==1}">
          	<input id="sexShow" value="" readonly="readonly" style="border: none;width: 65px;background:url(../resource/js/22.jpg) no-repeat;"/>
          	<input type="hidden" id="sex" /></c:if>
          </td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td align="left">
      <div class="luntan3" id='div<s:property value="triObj.id"/>' >
      <s:property value="triObj.content" escape="false"/>
      </div></td>
  </tr>
</table>
</div>
  <div class="luntan-banner"></div>
  <div class="luntan4">
    <ul>
    <s:iterator value="#pu.list" status="count">
 <li id="li_<s:property value="id"/>"><table width="1000" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td> 
      <table width="1000" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="200" height="30" align="left">&nbsp;</td>
          <td width="600" id='td<s:property value="id"/>' align="center" style="color:#396">${count.index+1} 楼：<s:property value="authorName"/>  回复日期：<s:date name="createTime" format="yyyy-MM-dd HH:mm:ss"/> </td>
          <td width="200" align="right"><c:if test="${userinfo.type==3}"><a href="javascript:sendEggOrFlower(<s:property value="id"/>,'1')" style="color:#036"><img src="../resource/img/flower.gif"/>鲜花（<s:property value="flowers"/>）</a>&nbsp; <a href="javascript:sendEggOrFlower(<s:property value="id"/>,'2')" style="color:#036"><img src="../resource/img/egg.gif"/>送蛋（<s:property value="eggs"/>）</a>&nbsp;<a href="#001" onclick="onReplay('<s:property value="id"/>','2');" style="color:#999">回复</a>&nbsp;&nbsp;</c:if></td>
          <td width="30" align="right"><c:if test="${sessionScope.userinfo.tribuneMaster==1}"><a href="javascript:deleteFlowerTie(<s:property value="id"/>)" style="color:#036">删除</a></c:if></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td align="left">
      <div class="luntan3" id='div<s:property value="id"/>'><s:property value="content" escape="false"/>
      </div></td>
  </tr>
</table></li>
</s:iterator>
    </ul>
  </div>
  </div>

  <div class="luntan4"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="15px">&nbsp;</td>
  </tr>
  <tr>
    <td align="right"><div class="">
      <div style="margin-top5px;height: 30px;" id="pagenation"></div></div></td>
  </tr>
</table></div>
<a name="001" id="001" ></a>
<c:if test="${userinfo.type==3}">
   <div class="luntan4">
 <table width="100%" border="0" cellspacing="0" cellpadding="0">
	  <tr>
	   <td style="padding-left:0px; padding-top:15px;">回帖：</td> <td style="padding-left:0px; padding-top:15px;"><textarea style="width:860px;height:200px;word-wrap:break-word;"  id="contentT" name="triFObj.content" ></textarea></td>
	  </tr>
	  <tr>
	     <td style="padding-left:55px;padding-top:5px;" align="left">
			</td>
			<td style="padding-left:0px;padding-top:5px;" align="left">
				<input type="submit" value="提交"/>
			</td>
		</tr>
	</table>
	</div>
	</c:if>
	<input type="hidden" id="mainid" name="triFObj.tid" value='<s:property value="triObj.id"/>'/>
	<input type="hidden" name="triObj.flowCount" value="0"/>
	<input type="hidden" name="triObj.viewCount" value="0"/>
	<input type="hidden" name="triObj.isMarrow" value="2"/>
	<input type="hidden" name="triObj.flowers" value="0"/>
	<input type="hidden" name="flag" value="1"/>
</div>
</form>
		<iframe src="<%=basePath%>index/footer.html" frameborder="0"
				scrolling="no" width="100%" ; height="90px;"></iframe>
				<script type="text/javascript" src="../resource/js/jquery.modelDiv.js"></script>
<script type="text/javascript">
	acceptArea = "sex";
   $("#sexShow").showModelDiv("{width:'95px',height:'300px'}","{'1':'删除此贴','2':'标记为精华','3':'撤销标记','4':'置顶','5':'撤销置顶'}","sex","",function(){aaaa()});
	function aaaa(){
		var idString = '<s:property value="triObj.id"/>';  
		if($("#"+acceptArea).val()=="1"){
			if (confirm("确定删除此贴吗?"))
			$.get("../tribune/tribune_deletetribune.shtml?idString=" + idString + "&type=1",function(message){
			    var  obj= eval('('+message+')');
					var result = obj[0]["message"];
					alert(result);
					window.location.href="../tribune/tribune_julebuPage.shtml";
			})
		}
		if($("#"+acceptArea).val()=="2"){
		if (confirm("确定标记为精华贴吗?"))
			$.get("../tribune/tribune_changeIsMarrow.shtml?idString="+idString+"&isMarrow=1",function(message){
			    var  obj= eval('('+message+')');
					var result = obj[0]["message"];
					alert(result);
					window.location.href="../tribune/tribune_julebuPage.shtml";
			})
		}
		if($("#"+acceptArea).val()=="3"){
			if (confirm("确定撤销标记吗?"))
			$.get("../tribune/tribune_changeIsMarrow.shtml?idString="+idString+ "&isMarrow=2",function(message){
			    var  obj= eval('('+message+')');
					var result = obj[0]["message"];
					alert(result);
					window.location.href="../tribune/tribune_julebuPage.shtml";
			})
		}
		if($("#"+acceptArea).val()=="4"){
			if (confirm("确定将此贴置顶吗?"))
			$.get("../tribune/tribune_toTop.shtml?idString="+idString+"&topType=1",function(message){
			    var  obj= eval('('+message+')');
					var result = obj[0]["message"];
					alert(result);
					window.location.href="../tribune/tribune_julebuPage.shtml";
			})
		}
		if($("#"+acceptArea).val()=="5"){
			if (confirm("确定取消置顶吗?"))
			$.get("../tribune/tribune_toTop.shtml?idString="+idString+"&topType=0",function(message){
			    var  obj= eval('('+message+')');
					var result = obj[0]["message"];
					alert(result);
					window.location.href="../tribune/tribune_julebuPage.shtml";
			})
		}
	}
var i=0;
	var j=0;
	var iid ='0';
	var sendFlag = false;
	
	function sendEggOrFlower(id,type){
		if('${sessionScope.userinfo.id}'==''){
			alert("请先登陆!");
			return ;
		}
		$.get('../tribune/tribune_sendFlowerOrEgg.shtml?trip.tid='+id+'&trip.flag='+type,function(mes){
			if(mes=='0'){alert('您已赠送过该拼友！')};
			if(mes=='1'){alert('赠送成功！');window.top.location='<%=basePath%>tribune/tribune_searchById.shtml?id='+$("#mainid").val()+"&#td"+id;};
			if(mes=='2'){alert('赠送失败！')};
		});
	}
	
  	function searchPagenation(pageno,limit){
  		window.location.href = '../tribune/tribune_searchById.shtml?id='+'<s:property value="triObj.id"/>'+'&pageno='+pageno+'&limit='+limit;
  	}
  	
  	var pageNo = '<s:property value="#pu.pageNo"/>';
  	var limit = '<s:property value="#pu.pageSize"/>';
	pageno_warning_text = "输入的页码不是数字，请重新输入！";
	pagination({
		totalRecords:'<s:property value="#pu.totalRecords"/>',pageNo:pageNo,limit:limit,id:'pagenation',showPages:8,uri:function(pageno,limit){
			searchPagenation(pageno,limit)
		}
	})
	function addfavorite()
{
    window.external.addFavorite('http://www.9898sj.com','幸福兄弟')  ;
} 
	function setFlagValue(v,m){
		$("#flag").val(v);
		$("#pid").val(m);
	}
	function checkmodify(){
		if('${sessionScope.userinfo.id}'==''){
			alert("请先登陆");
			// window.top.location='../index.html';
			return false;
		}
		return true;
	}

var userType = '${sessionScope.userinfo.type}';
		var editor;
		if(document.getElementById("contentT"))
        KindEditor.ready(function(K) {
               editor = K.create('#contentT', {
               allowFileManager : true,
               uploadJson : '../resource/js/kindeditor-4.1/upload_json.jsp',
		       fileManagerJson : '../resource/js/kindeditor-4.1/file_manager_json.jsp',
                     items : [
			 	           'preview','source', '|', 'undo', 'redo', '|',  'cut', 'copy', 'paste',
				        'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
				        'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
				        'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
				        'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
				        'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image',
				       'insertfile', 'table', 'hr', 'emoticons', 'map', 'pagebreak',
				        'link', 'unlink'
                ]
              });
        });


function onReplay(tid,flag) {
	if('${sessionScope.userinfo.id}'==''){
			alert("请登陆后再回帖！");
			return ;
		}
		if(flag=='2')
             editor.html($("#div"+tid).html() + "</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +'<font style="color:#758d81;font-size:11px" >'+ $("#td"+tid).html()+"</font>"+"</br>---------------------------------------------------------------------------------------------------</br>");
}
function sendTie(){
	if('${sessionScope.userinfo.id}'==''){
		alert('请先登录！');
		return false;
	}
	if(userType!='1'&&userType!='2'&&userType!='3'){
		alert('对不起，您的等级不够，无法发帖！');
		return false;
	}
	var heihtTemp = GetPageScroll();
	$("#joinDiv").css("top", (heihtTemp + 60) + 'px').css("left",
			(bodyWidth - 600) / 2 + "px");
	$("#grayDiv,#joinDiv").show();
	$("#flexDiv").hide();
}		
var bodyWidth;
bodyWidth = $("body").width();
$("#grayDiv").height($("body").height());
function hideJoin() {
	$("#flexDiv").show();
	$("#grayDiv,#joinDiv").hide();
}
function GetPageScroll() {
	var x, y;
	if (window.pageYOffset) { // all except IE
		y = window.pageYOffset;
		x = window.pageXOffset;
	} else if (document.documentElement && document.documentElement.scrollTop) { // IE 6
		// Strict
		y = document.documentElement.scrollTop;
		x = document.documentElement.scrollLeft;
	} else if (document.body) { // all other IE
		y = document.body.scrollTop;
		x = document.body.scrollLeft;
	}
	return y;
}
function deleteFlowerTie(id){
if('${sessionScope.userinfo.id}'==''){
	alert('请先登录！');
	return false;
}
if('${sessionScope.userinfo.tribuneMaster}'!='1'){
	alert('对不起您无权删除！');
	return false;
}
	if (confirm("确认删除吗?")){
		$.get('../tribuneFlow/tribuneFlow_deleteFlowerTie.shtml?idString='+id+'&t='+new Date().getTime().toString(36),function(msg){
			var obj = eval('(' + msg + ')');
			var result = obj[0]["message"];
			alert(result);
			$("#li_"+id).hide();
		});
	}
}
  var editor1;
       KindEditor.ready(function(K) {
	               editor1 = K.create('#trcontent', {
	               allowFileManager : true,
	               uploadJson : '../resource/js/kindeditor-4.1/upload_json.jsp',
			       fileManagerJson : '../resource/js/kindeditor-4.1/file_manager_json.jsp',
                      items : [
				 	        'source', '|', 'undo', 'redo', '|', 'cut', 'copy', 'paste',
					         '|', 'justifyleft', 'justifycenter', 'justifyright',
					        'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
					        'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 
					        'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
					        'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image',
					        'table', 'hr', 'emoticons', 'map', 'link', 'unlink'
                 ]
               });
       });
</script>
</body>
</html>